package com.cnplan.mapper;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.cnplan.entity.ArcRollImage;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

public interface ArcRollImageMapper extends BaseMapper<ArcRollImage> {

    @Select(value = "select * from arc_roll_image where ct_id=#{ctId}")
    List<ArcRollImage> selectArcRollImage(@Param("ctId")String ctId);

    @Select(value = "select * from arc_roll_image where ct_id=#{ctId}")
    List<ArcRollImage> findAllRollImage(@Param("ctId")String ctId);

    @Select(value = "select * from arc_roll_image")// where image_url is null
    List<ArcRollImage> findAllRollImageList();

    @Update(value = "update arc_roll_image set image_url=#{url} where id=#{id}")
    void updateRollImageRul(@Param("id")String id,@Param("url")String url);

    @Update(value = "update arc_roll_image set image_num=#{num} where id=#{id}")
    void updateRollImageNum(@Param("id")String id,@Param("num")String num);
}
